package com.sjyl.kaoshitong.activities;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;

import com.sjyl.kaoshitong.BaseActionBarActivity;
import com.sjyl.kaoshitong.R;
import com.sjyl.kaoshitong.fragment.SimpleFragment;

/**
 * Created by ChangerLow on 15/6/12.
 * Email: changerlow@qq.com
 */
public class FragmentContainerActivity extends BaseActionBarActivity {


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.fragment_container);
        FragmentManager fm = this.getSupportFragmentManager();
        FragmentTransaction ft = fm.beginTransaction();
        Fragment fragment = SimpleFragment.newInstance("simple");
        ft.add(R.id.container, fragment);
        ft.commitAllowingStateLoss();
    }
}
